<template>
  <el-dialog
    width="100%"
    top="0px"
    :fullscreen="true"
    :title="this.title"
     class="label_font"
    :close-on-click-modal="false"
    :visible.sync="visible">
    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="160px">

    <el-row  >
      <el-col :span="12"   >
            <el-form-item label="合同备案号" prop="contractno" class="label_font" >
              <el-input v-model="dataForm.contractno" placeholder="合同备案号"
                  :disabled="isInputDisabled()"  :readonly=true style="100%"></el-input>
            </el-form-item>
      </el-col>

      <el-col :span="12">
          <el-form-item label="合同备案类型" prop="ctype" class="label_font">
            <el-select v-model="dataForm.ctype" placeholder="合同备案类型"     :disabled="isInputDisabled()" style="width:100%" >
                <el-option
                  v-for="item in dataForm.contractTypeList"
                  :key="item.value"
                  :label="item.text"
                  :value="item.value">
                </el-option>
            </el-select>
          </el-form-item>
      </el-col>
    </el-row>

    <el-row>

      <el-col :span="12">
          <el-form-item label="不动产所属地市" prop="seRegion" class="label_font">
              <el-select  @change="selectChanged" v-model="dataForm.seRegion" 
                  :disabled="isInputDisabled()"
                placeholder="不动产所属地市" style="width:100%">
              <el-option
                v-for="item in dataForm.seRegionList"
                :key="item.code"
                :label="item.name"
                :value="item.code">
              </el-option>
          </el-select>
          </el-form-item>
      </el-col>

      <el-col :span="12">
          <el-form-item label="不动产所属区县" prop="region" class="label_font">
            <el-select v-model="dataForm.region"   @change="selectChanged2"  :disabled="isInputDisabled()" placeholder="不动产所属区县" style="width:100%">
                <el-option
                  v-for="item in dataForm.regionList"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code">
                </el-option>
            </el-select>
          </el-form-item>
      </el-col>

    </el-row>


    <el-row>
      <el-col :span="12">
          <el-form-item label="代理人联系电话" prop="rightagentphone" class="label_font">
            <el-input v-model="dataForm.rightagentphone"  placeholder="回车自动回显代理人信息"    
              @keyup.enter.native="queryDyqr"
              :disabled="isInputDisabled()"></el-input>
          </el-form-item>
      </el-col>
      <el-col :span="12">
          <el-form-item label="权利人代理人名称" prop="rightagentname" class="label_font">
            <el-input v-model="dataForm.rightagentname" placeholder="权利人代理人名称"    :disabled="isInputDisabled()"></el-input>
          </el-form-item>
      </el-col>
    </el-row>

    <el-row>

      <el-col :span="12" v-if="false">
          <el-form-item label="权利人代理人类型" prop="rightagenttype" class="label_font">
            <el-select v-model="dataForm.rightagenttype" placeholder="权利人代理人类型"    :disabled="isInputDisabled()" style="width:100%">
            </el-select>
          </el-form-item>
      </el-col>
      <el-col :span="12">
          <el-form-item label="权利人代理人证件类型" prop="rightagentidtype" class="label_font">
            <el-select v-model="dataForm.rightagentidtype" placeholder="权利人代理人证件类型"    :disabled="isInputDisabled()" style="width:100%">
            </el-select>
          </el-form-item>
      </el-col>

            <el-col :span="12">
        <el-form-item label="权利人代理人证件号码" prop="rightagentidcard" class="label_font">
          <el-input v-model="dataForm.rightagentidcard" placeholder="权利人代理人身份证号码"    :disabled="isInputDisabled()"></el-input>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>

      
      <el-col :span="12">
            <el-form-item label="是否电子归档件" prop="isdzyxyw"  class="label_font">
               <el-select v-model="dataForm.isdzyxyw" placeholder="是否电子归档件" style="width:100%"  :disabled="isInputDisabled()"  >
                        <el-option
                        :key="'0'"
                        :label="'否'"
                        :value="'0'" >
                        </el-option>
                        <el-option
                        :key="'1'"
                        :label="'是'"
                        :value="'1'">
                        </el-option>
               </el-select>
            </el-form-item>  
      </el-col>

      <el-col :span="12">
        <el-form-item label="合并编码"  prop="babsm"  class="label_font">
          <el-input  placeholder="系统自动生成" v-model="dataForm.babsm" :readonly=true    :disabled="isInputDisabled()"></el-input>
        </el-form-item>
      </el-col>
    </el-row>
  

    <el-row>
      <el-col :span="12">
          <el-form-item label="不动产单元号" prop="realtyunitno" class="label_font">
            <el-input v-model="dataForm.realtyunitno" placeholder="不动产单元号" :readonly=true    :disabled="isInputDisabled()"></el-input>
          </el-form-item>
      </el-col>
      <el-col :span="12">
          <el-form-item label="用途" prop="fwyt" class="label_font">
        <el-input v-model="dataForm.fwyt" placeholder="用途" :readonly=true    :disabled="isInputDisabled()"></el-input>
          </el-form-item>
      </el-col>
    </el-row>    

   


    <el-row>
      <el-col :span="12">
        <el-form-item label="办理点" prop="site" class="label_font">
          <el-select v-model="dataForm.site" placeholder="办理点"    :disabled="isInputDisabled()" style="width:100%">
                <el-option
                  v-for="item in dataForm.siteList"
                  :key="item.siteno"
                  :label="item.sitename"
                  :value="item.siteno">
                </el-option>
            </el-select>
        </el-form-item>
      </el-col>

      <el-col :span="12" v-if="false">
        <el-form-item label="领证方式" prop="gettype" class="label_font">
             <el-select v-model="dataForm.gettype" placeholder="领证方式"    :disabled="isInputDisabled()" style="width:100%">

            </el-select>
        </el-form-item>
      </el-col>

      <el-col :span="12">
        <el-form-item label="附记" prop="fj" class="label_font">
              <el-input v-model="dataForm.fj" placeholder="附记"     :disabled="isInputDisabled()"></el-input>
        </el-form-item>
      </el-col>

    </el-row>

        <el-row>
      <el-col :span="12">
        <el-form-item label="领证人" prop="lzr" class="label_font">
              <el-input v-model="dataForm.lzr" placeholder="领证人"     :disabled="isInputDisabled()"></el-input>
        </el-form-item>
      </el-col>

      <el-col :span="12">
        <el-form-item label="领证时间" prop="lzsj" class="label_font">
             <el-date-picker
             style="width:100%"
                 :disabled="isInputDisabled()"
             format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
          v-model="dataForm.lzsj"
          type="date"
          placeholder="选择结束时间"
          align="right"
        >
        </el-date-picker>
        </el-form-item>
      </el-col>

    </el-row>



    <el-row v-if="isSumbitEnabled()">
      <el-col :span="12">
        <el-form-item label="审核结果" prop="checkresult" 
           :class="{ 'is-required': isSumbitEnabled() }"
          class="label_font" >
            <el-radio-group v-model="dataForm.checkresult"   >
               <el-radio label="1">审核通过</el-radio>
               <el-radio label="2">退回信息补正</el-radio>
               <el-radio label="3">退回资料补正</el-radio>
             </el-radio-group>
        </el-form-item>
      </el-col>

      <el-col :span="12">
        <el-form-item label="审核不通过理由" prop="rejectreason" class="label_font"
         :class="{ 'is-required': isSumbitEnabled() && dataForm.checkresult == 2  || dataForm.checkresult == 3}"
         v-if="isSumbitEnabled() && (dataForm.checkresult == 2 || dataForm.checkresult == 3)">
          <el-input v-model="dataForm.rejectreason" placeholder="审核不通过理由" ></el-input>
        </el-form-item>
      </el-col>
    </el-row> 

    <el-row v-if="this.step == 0">
    <el-table
      :data="qlrList"
      border
      :header-cell-style="{color:'#333', fontSize:'14px',fontWeight:'bold'}"
      v-loading="dataListLoading"
      style="width: 100%;">

      <el-table-column
        prop="name"
        header-align="center"
        align="center"
        label="权利人名称">
      </el-table-column>
      <el-table-column
        prop="ptype"
        header-align="center"
        align="center"
        label="权利人类型">
      </el-table-column>
      <el-table-column
        prop="idtype"
        header-align="center"
        align="center"
        label="权利人证件类型">
      </el-table-column>
      <el-table-column
        prop="idcode"
        header-align="center"
        align="center"
        label="权利人证件号码">
      </el-table-column>
      <el-table-column
        prop="protion"
        header-align="center"
        align="center"
        label="权利比例">
      </el-table-column>

    </el-table>
    </el-row>

    <el-row v-if="this.step == 0">
    <el-table
      :data="ywrList"
      border
      :header-cell-style="{color:'#333', fontSize:'14px',fontWeight:'bold'}"
      v-loading="dataListLoading"
      style="width: 100%;" >

            <el-table-column
        prop="name"
        header-align="center"
        align="center"
        label="义务人名称">
      </el-table-column>
      <el-table-column
        prop="ptype"
        header-align="center"
        align="center"
        label="义务人类型">
      </el-table-column>
      <el-table-column
        prop="idtype"
        header-align="center"
        align="center"
        label="义务人证件类型">
      </el-table-column>
      <el-table-column
        prop="idcode"
        header-align="center"
        align="center"
        label="义务人证件号码">
      </el-table-column>
      <el-table-column
        prop="protion"
        header-align="center"
        align="center"
        label="权利比例">
      </el-table-column>

    </el-table>
    </el-row>

    
    <el-row v-if="this.step != 0">
    <el-table
      :data="qlrList"
      border
      :header-cell-style="{color:'#333', fontSize:'14px',fontWeight:'bold'}"
      v-loading="dataListLoading"
      style="width: 100%;">

      <el-table-column
        prop="MC"
        header-align="center"
        align="center"
        label="权利人名称">
      </el-table-column>
      <el-table-column
        prop="TYPE"
        header-align="center"
        align="center"
        label="权利人类型">
      </el-table-column>
      <el-table-column
        prop="ZJLB"
        header-align="center"
        align="center"
        label="权利人证件类型">
      </el-table-column>
      <el-table-column
        prop="ZJHM"
        header-align="center"
        align="center"
        label="权利人证件号码">
      </el-table-column>
      <el-table-column
        prop="QLBL"
        header-align="center"
        align="center"
        label="权利比例">
      </el-table-column>

    </el-table>
    </el-row>

    <el-row v-if="this.step != 0">
    <el-table
      :data="ywrList"
      border
      :header-cell-style="{color:'#333', fontSize:'14px',fontWeight:'bold'}"
      v-loading="dataListLoading"
      style="width: 100%;" >


      <el-table-column
        prop="MC"
        header-align="center"
        align="center"
        label="义务人名称">
      </el-table-column>
      <el-table-column
        prop="TYPE"
        header-align="center"
        align="center"
        label="义务人类型">
      </el-table-column>
      <el-table-column
        prop="ZJLB"
        header-align="center"
        align="center"
        label="义务人证件类型">
      </el-table-column>
      <el-table-column
        prop="ZJHM"
        header-align="center"
        align="center"
        label="义务人证件号码">
      </el-table-column>
      <el-table-column
        prop="QLBL"
        header-align="center"
        align="center"
        label="权利比例">
      </el-table-column>

    </el-table>
    </el-row>

    <el-row  >
      <el-col :span="12">
          <el-row align="center" justify="center" >
              <el-col :span="24">

                  <div class="xwbl cell_border">权利人询问笔录</div>
              </el-col>
          </el-row>
          <el-row>
                <el-col :span="12" class="xwbl_item cell_border">是否为真实意思表示 ？</el-col>
                <el-col :span="12" class="xwbl_item cell_border">
                                 <el-radio-group v-model="dataForm.left1">
               <el-radio label="1"    :disabled="isInputDisabled()" >是</el-radio>
               <el-radio label="0"    :disabled="isInputDisabled()" >否</el-radio>
             </el-radio-group>
                </el-col>
          </el-row>
                    <el-row>
                <el-col :span="12" class="xwbl_item cell_border_bottom">是否为共有房屋 ？</el-col>
                <el-col :span="12" class="xwbl_item cell_border_bottom">
                                 <el-radio-group v-model="dataForm.left2">
               <el-radio label="1"  :disabled="isInputDisabled()" >是</el-radio>
               <el-radio label="0"  :disabled="isInputDisabled()" >否</el-radio>
             </el-radio-group>
                </el-col>
          </el-row>


      </el-col>
      <el-col :span="12">
          <el-row>
              <el-col :span="24">

                  <div class="xwbl cell_border">义务人询问笔录</div>
              </el-col>
          </el-row>
                    <el-row>
                <el-col :span="12" class="xwbl_item cell_border">是否为真实意思表示 ？</el-col>
                <el-col :span="12" class="xwbl_item cell_border">
                                 <el-radio-group v-model="dataForm.right1">
               <el-radio label="1"  :disabled="isInputDisabled()" >是</el-radio>
               <el-radio label="0"  :disabled="isInputDisabled()" >否</el-radio>
             </el-radio-group>
                </el-col>
          </el-row>

           <el-row>
                <el-col :span="12" class="xwbl_item cell_border_bottom">是否为共有房屋 ？</el-col>
                <el-col :span="12" class="xwbl_item cell_border_bottom">
                <el-radio-group v-model="dataForm.right2">
               <el-radio label="1"  :disabled="isInputDisabled()" >是</el-radio>
               <el-radio label="0"  :disabled="isInputDisabled()" >否</el-radio>
                    </el-radio-group>
                </el-col>
          </el-row>



      </el-col>
    </el-row>
    <el-row>
<el-col>
  <div>
    <table width='100%' border="1"  cellspacing="0" style="margin-top:-1px">
                                        <tr>
                                            <td rowspan="7" align="center"><b>影像件:</b></td>
                                        </tr>
                                        <tr>

                                            <td>文件编码01：预购商品房预告登记申请书，需签字（签章） <font color="red"><b>*</b></font></td>
                                            <td>
                                                 <div style="width:300px;"></div>                                               
                                                <el-upload :action="url" 
                                                  ref="upload1"
                                                  :on-success="successHandle1"
                                                  :file-list="fileList1"
                                                  :on-preview="handlePreview"
                                                  
                                                  multiple
                                                  :before-upload="beforeUpload"
                                                  :accept="filetype()"

                                                  :disabled="isFileDisabled()" 
                                                  :show-file-list="true"
                                                  :on-exceed="handleExceed"
                                                  :data="{seqno:this.seqno, fileCode:'01'}"
                                                  :before-remove="beforeRemove"
                                                  :on-remove="handleRemove21"
                                                  
                                            >
                                              <el-button size="small" type="primary" v-if="isFileEnabled()" >点击上传</el-button>
                                            </el-upload>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>文件编码02：申请人身份证明材料（开发商企业统一社会信用代码证；买受人委托办理预告登记的公证委托书） <font
                                                    color="red"><b>*</b></font></td>
                                            <td>
                                                                                                <el-upload :action="url" 
                                          
                                                  :on-success="successHandle2"
                                                  ref="upload2"
                                                  :file-list="fileList2"
                                                  :on-preview="handlePreview"
                                                  multiple
                                                  :before-upload="beforeUpload"
                                                  :accept="filetype()"
                                                  :disabled="isFileDisabled()"  
                                                  :show-file-list="true"
                                                  :on-exceed="handleExceed"
                                                  :data="{seqno:this.seqno, fileCode:'02'}"
                                                  :before-remove="beforeRemove"
                                                  :on-remove="handleRemove22"
                                               
                                            >
                                              <el-button size="small" type="primary" v-if="isFileEnabled()" >点击上传</el-button>
                                            </el-upload>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>文件编码03：已登记备案的商品房预售合同 <font color="red"><b>*</b></font></td>
                                            <td>
                                                                                                <el-upload :action="url" 
                                          
                                                  :on-success="successHandle3"
                                                  ref="upload3"
                                                  :file-list="fileList3"
                                                  :on-preview="handlePreview"
                                                  multiple
                                                  :before-upload="beforeUpload"
                                                  :accept="filetype()"
                                                   :disabled="isFileDisabled()"  
                                                  :show-file-list="true"
                                                  :on-exceed="handleExceed"
                                                  :data="{seqno:this.seqno, fileCode:'03'}"
                                                  :before-remove="beforeRemove"
                                                  :on-remove="handleRemove23"
                                              
                                            >
                                              <el-button size="small" type="primary" v-if="isFileEnabled()" >点击上传</el-button>
                                            </el-upload>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>文件编码04：当事人关于预告登记的约定 <font color="red"><b>*</b></font></td>
                                            <td>

                                                  <el-upload :action="url" 
                                                  ref="upload4"
                                                  :on-success="successHandle4"
                                                  :file-list="fileList4"
                                                  :on-preview="handlePreview"
                                                  multiple
                                                  :before-upload="beforePicUpload"
                                                  :accept="pictype()"  
                                                  :disabled="isFileDisabled()"   
                                                  :show-file-list="true"
                                                  :on-exceed="handleExceed"
                                                  :data="{seqno:this.seqno, fileCode:'04'}"
                                                  :before-remove="beforeRemove"
                                                  :on-remove="handleRemove24"
                                                  
                                            >
                                              <el-button size="small" type="primary" v-if="isFileEnabled()" >点击上传</el-button>
                                            </el-upload>

                                            </td>
                                        </tr>
                                        <tr>
                                            <td>文件编码05：国家安全事项审查意见书（房屋涉外销售、转让的应提交）。
                                            </td>
                                            <td>
                                                  <el-upload :action="url" 
                                                  ref="upload5"
                                                  :on-success="successHandle5"
                                                  :file-list="fileList5"
                                                  :on-preview="handlePreview"
                                                   multiple
                                                  :before-upload="beforePicUpload"
                                                  :accept="pictype()" 
                                                  :disabled="isFileDisabled()"    
                                              
                                                  :show-file-list="true"
                                                  :on-exceed="handleExceed"
                                                  :data="{seqno:this.seqno, fileCode:'05'}"
                                                  :before-remove="beforeRemove"
                                                  :on-remove="handleRemove25"
                                                  
                                            >
                                              <el-button size="small" type="primary" v-if="isFileEnabled()" >点击上传</el-button>
                                            </el-upload>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>文件编码06：预售人与预购人在商品房预售合同中对预告登记附有条件和期限的，预购人应当提交相应材料
                                            </td>
                                            <td>
                                            
                                            <el-upload :action="url" 
                                                  ref="upload6"
                                                  :on-success="successHandle6"
                                                  :file-list="fileList6"
                                                  :on-preview="handlePreview"
                                                   :before-upload="beforePicUpload"

                                                   multiple
                                                  :accept="pictype()" 
                                                  :disabled="isFileDisabled()"     
                                                  :show-file-list="true"
                                                  :on-exceed="handleExceed"
                                                  :data="{seqno:this.seqno || 0, fileCode:'06'}"
                                                  :before-remove="beforeRemove"
                                                  :on-remove="handleRemove26"
                                               
                                            >
                                              <el-button size="small" type="primary" v-if="isFileEnabled()">点击上传</el-button>
                                            </el-upload>
                                            
                                            </td>
                                        </tr>
                                    </table>
  </div>
                                    
  <div><font color="red">影像文件中带 * 的为必须上传的文件</font></div>  
         
</el-col>
    </el-row>


    <el-row>
      <el-col>

  <table width='100%' border="1"  cellspacing="0"  >
                                        <tr>
                                            <td rowspan="10" align="center" width="80px"><b>已备案材料:</b></td>
                                        </tr>
                                        <tr>

                                            <td>营业执照</td>
                             
                             

                                            <td width="50%">
                                                  <div v-if="url1 == ''" class="wba">未备案</div>
                                                   <div class="demo-image__preview" v-if="url1 != ''">
                                                      <el-image 
                                                        style="width: 100px; height: 100px"
                                                        :src="url1" 
                                                        :preview-src-list="srcList">
                                                      </el-image>
                                                  </div>                                           
                                             
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>介绍信
                                                 
                     
                                            
                                            </td>
                                            <td>
                                             <div v-if="url2 == ''" class="wba">未备案</div>
                                              <div class="demo-image__preview" v-if="url2 != ''">
                                                      <el-image 
                                                        style="width: 100px; height: 100px"
                                                        :src="url2" 
                                                        :preview-src-list="srcList">
                                                      </el-image>
                                                  </div> 
                                         

                                            </td>
                                        </tr>
                                        <tr>
                                            <td>身份证</td>
                                            <td>
                                                <div v-if="url3 == ''" class="wba">未备案</div>
                                                 <div class="demo-image__preview" v-if="url3 != ''">
                                                      <el-image 
                                                        style="width: 100px; height: 100px"
                                                        :src="url3" 
                                                        :preview-src-list="srcList">
                                                      </el-image>
                                                  </div>        
                                            </td>
                                        </tr>
                                        

                                        <tr>
                                            <td>签名图片
                                            </td>
                                            <td>
                                            <div v-if="url4 == ''" class="wba">未备案</div>
                                             <div class="demo-image__preview" v-if="url4 != ''">
                                                      <el-image 
                                                        style="width: 100px; height: 100px"
                                                        :src="url4" 
                                                        :preview-src-list="srcList">
                                                      </el-image>
                                                  </div>
                                            
                                            </td>
                                        </tr>


                                        <tr>
                                            <td>合同  </td>
                                            <td>
                                                <div v-if="srcHtbaList.length == 0" class="wba">未备案</div>
                                                <div v-if="srcHtbaList.length > 0">
                                                  <div v-for="(item,index) in srcHtbaList" :key="index" class="table-flex" style="float:left;" >
                                                    <el-image style="width: 100px; height: 100px" :src="item" :preview-src-list="srcList"></el-image>
                                                  </div>
                                                </div>
                                              

                                            </td>
                                        </tr>

                                    </table>                            

      </el-col>
    </el-row>


    </el-form>
    <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="save()" v-if="!isInputDisabled()">信息保存</el-button> 
        <el-button type="primary" @click="saveComplete()" v-if="!isInputDisabled()">录入完成</el-button> 

        <el-button type="primary" @click="uploadComplete()" v-if="isFileEnabled()">资料上传完成</el-button> 
         <el-button type="primary" @click="checkHandle()">下载申请书</el-button>    
        <el-button type="primary"  v-if="isSumbitEnabled()" @click="submit()">提交</el-button>
      <el-button @click="visible = false">返回</el-button>

    </span>
  </el-dialog>
</template>

<script>
  export default {
    data () {

      var validateIdCard = (rule, value, callback) => {
        if (value && !this.datepicker.checkIdNumberValid(value)) {
          callback(new Error('权利人代理人证件号码有误'))
        } else {
          callback()
        }
      }

      
      var validateCheckresult = (rule, value, callback) => {
        if (!value && this.dataForm.state == '52') {
          callback(new Error('审核结果不能为空'))
        } else {
          callback()
        }
      }

      var validateRejectreason = (rule, value, callback) => {
        if (!value && this.dataForm.state == '52' && this.dataForm.checkresult != '1') {
          callback(new Error('审核不通过理由不能为空'))
        } else {
          callback()
        }
      }

      return {
        visible: false,
        url: '',
        title: '',
     
        fileList1: [],
        fileList2: [],
        fileList3: [],
        fileList4: [],
        fileList5: [],
        fileList6: [],
        dataListLoading: false,
        qlrList: [],
        ywrList: [],
        seqno: 0,
        step: 0,

        srcList: [],
        url1: '',
        url2: '',
        url3: '',
        url4: '',
        srcHtbaList: [],

        dataForm: {
          dyqrmc: '',
          seqno: 0,
          contractno: '',
          ctype: '',
          isdzyxyw: '',

          rightagentphone: '',
          rightagentname: '',
          realtyunitno: '',
          region: '',
          seRegion: '',

          fwyt: '',
          siteList: [],

          contractTypeList: [],
          regionList:[],

          bankList: [],
          seRegionList: [],

          gettype: '',
          rightagenttype: '个人',
          rightagentidtype: '身份证',
          babsm: '',
          rightagentidcard: '',
          site: '',

          left1: '',
          left2: '',
          left3: '',
          left4: '',    
          right1: '',
          right2: '',
          right3: '',
          right4: '',

          lzr: '',
          lzsj: '',
          fj: '',
          checkresult: '',
          rejectreason: '',
          state: '',
          orgid: ''
        },
        dataRule: {
          

          checkresult:[
              { validator: validateCheckresult, trigger: 'blur' }
          ],

          rejectreason:[
              { validator: validateRejectreason, trigger: 'blur' }
          ],
         

          site: [
            { required: true, message: '办理点不能为空', trigger: 'blur' }
          ],
          contractno: [
            { required: true, message: '合同备案号不能为空', trigger: 'blur' }
          ],
          ctype: [
            { required: true, message: '合同备案类型不能为空', trigger: 'blur' }
          ],
          seRegion: [
            { required: true, message: '不动产所属地市不能为空', trigger: 'blur' }
          ],
          region: [
            { required: true, message: '不动产所属区县不能为空', trigger: 'blur' }
          ],
          lzr:[
            { required: true, message: '领证人不能为空', trigger: 'blur' }
          ],
          lzsj:[
            { required: true, message: '领证时间不能为空', trigger: 'blur' }
          ],
          rightagentidcard:[
          { validator: validateIdCard, trigger: 'blur' }
          ]
          
          ,
          fj:[
            { required: true, message: '附记不能为空', trigger: 'blur' }
          ]
        }
      }
    },

    computed: {
      orgid: {
        get () { return this.$store.state.user.orgid }
      }
    },

    methods: {

        pictype(){
          return "image/jpg,image/jpeg"
        },
        filetype(){
          if (this.dataForm.isdzyxyw == 0){
              return "image/jpg,image/jpeg"
          }
          else{
            return ".pdf,.PDF"
          }
        },

        initBabsm(){
            this.$http({
                url: this.$http.adornUrl(`/bdc/bdcrecordimage/query/jbr`),
                method: 'post',
                data: this.$http.adornData({
                  'region': this.dataForm.region,
                  'seRegion': this.dataForm.seRegion,
                  'phone': this.dataForm.rightagentphone,
                  'dyqr': this.dataForm.orgid
                })
            }).then(({data}) => {
                if (data && data.code === 0) {
                    this.oImages.push(data.dyqrdlr.yxbsm)
                    this.dataForm.rightagentname = data.dyqrdlr.name
                    this.dataForm.rightagentidcard = data.dyqrdlr.idcode

                    this.url2 = this.buildDownloadUrl(data.dyqrdlr.yxbsm + "_" + data.dyqrdlr.fname)
                    console.log(this.url2)
                    this.queryYyzz(data.dyqrdlr.bdcno)
                    this.querySfz(data.dyqrdlr.bdcno, data.dyqrdlr.name+data.dyqrdlr.idcode)
                    this.querySignpic(data.dyqrdlr.bdcno, data.dyqrdlr.name+data.dyqrdlr.idcode)
                    this.queryHtbaList(data.dyqrdlr.bdcno)
                }else{
                  this.$message.error(data.msg)
                  this.url2 = ''
                }

            })
      },

      queryYyzz(djzx){
        this.$http({
                url: this.$http.adornUrl(`/bdc/bdcrecordimage/query/yyzz`),
                method: 'post',
                data: this.$http.adornData({
                  'bdcno': djzx,
                  'dyqr': this.dataForm.orgid
                })
            }).then(({data}) => {
                if (data && data.code === 0) {
                    this.url1 = this.buildDownloadUrl(data.yyzz.yxbsm + "_" + data.yyzz.fname)
                    console.log(this.url1)
                    this.oImages.push(data.yyzz.yxbsm)
                }

            })
      },

      querySignpic(djzx, fname){
        this.$http({
                url: this.$http.adornUrl(`/bdc/bdcrecordimage/query/signpic`),
                method: 'post',
                data: this.$http.adornData({
                  'bdcno': djzx,
                  'fname': '手写签名-'+fname,
                  'dyqr': this.dataForm.orgid
                })
            }).then(({data}) => {
                if (data && data.code === 0) {
                    this.url4 = this.buildDownloadUrl(data.signpic.yxbsm + "_" + data.signpic.fname)
                    console.log(this.url4)
                    this.oImages.push(data.signpic.yxbsm)
                }

            })
      },

      checkDyqrPhone(successCallback){
          this.$http({
                url: this.$http.adornUrl(`/bdc/bdcrecordimage/phone/check`),
                method: 'post',
                data: this.$http.adornData({
                  'region': this.dataForm.region,
                  'seRegion': this.dataForm.seRegion,
                  'phone': this.dataForm.rightagentphone,
                  'dyqr': this.dataForm.orgid,
                  'name': this.dataForm.rightagentname,
                  'idcode': this.dataForm.rightagentidcard
                })
            }).then(({data}) => {
                if (data && data.code === 0) {
                    if (successCallback){
                      successCallback()
                    }
                }else{
                  this.$message.error(data.msg)
                }

            })
      },

      queryHtbaList(djzx){
        this.$http({
                url: this.$http.adornUrl(`/bdc/bdcrecordimage/query/htba`),
                method: 'post',
                data: this.$http.adornData({
                  'bdcno': djzx
                })
            }).then(({data}) => {
                if (data && data.code === 0) {
                  this.oImages.push(data.yxbsm)
                  for (var i = 0; i < data.htbaList.length; i++){
                    var htba = data.htbaList[i]
                    var url = this.buildDownloadUrl(htba)
                    this.srcHtbaList.push(url)
                    console.log(url)
                  }
                    
                }

            })
      },

      querySfz(djzx, fname){
        this.$http({
                url: this.$http.adornUrl(`/bdc/bdcrecordimage/query/sfz`),
                method: 'post',
                data: this.$http.adornData({
                  'bdcno': djzx,
                  'fname': '身份证-'+fname,
                  'dyqr': this.dataForm.orgid
                })
            }).then(({data}) => {
                if (data && data.code === 0) {
                    this.url3 = this.buildDownloadUrl(data.sfz.yxbsm + "_" + data.sfz.fname)
                    console.log(this.url3)
                    this.oImages.push(data.sfz.yxbsm)
                }

            })
      },

      queryDyqr(){

        if (!this.dataForm.seRegion){
          this.$message.error("请选择所属地市")
          return
        }

        if (!this.dataForm.region){
          this.$message.error("请选择所属区县")
          return
        }



        this.initBabsm()

      },

      buildDownloadUrl(name){
            var token = this.$cookie.get('token')
        　　var url = this.$http.adornUrl('/bdc/bdcrecordimage/downFile/' + name  + ".jpg" + '?token=' + token)
            this.srcList.push(url)
            return url;
      },

      beforePicUpload (file) {
        
          if (file.type !== 'image/jpg' && file.type !== 'image/jpeg') {
            this.$message.error('只支持jpg格式的图片！')
              this.check = false
            return false
          }
        
           this.check = true 
      },

      selectChanged2(value){
          console.log("selectChanged2:" + value)
          this.dataForm.site = ''
          this.$http({
          url: this.$http.adornUrl(`/bdc/bdcsiteinfo/query/` + value),
              method: 'get',
              params: this.$http.adornParams()
          }).then(({data}) => {
            if (data && data.code === 0) {
              this.dataForm.siteList = data.siteList
            }else{
              this.dataForm.siteList = []
            }
        })
      },

      init (id, step) {
        this.dataForm.seRegion = ''
        if (step == 0){
           this.dataForm.seqno = id
           this.seqno = 0
        }else{
          this.seqno = id ||  0
          
        }

        this.dataForm.checkresult = ""
        this.dataForm.rejectreason = ""
        this.dataForm.state = ''

        this.fileList1 = [];
        this.fileList2 = [];
        this.fileList3 = [];
        this.fileList4 = [];
        this.fileList5 = [];
        this.fileList6 = [];

        this.oImages = []
        this.url3 = ''
        this.url2 = '',
        this.url1 = '',
        this.url4 = '',
        this.srcList = []
        this.srcHtbaList = [] 
  
        this.visible = true
        this.url = this.$http.adornUrl(`/bdc/bdcnoticeregist/upload?token=${this.$cookie.get('token')}`)
        this.dataForm.gettype = '电子证明';
        this.step = step;
        this.title = '预购商品房预告登记';
        if (step == 1){
           this.title = '预购商品房预告登记(完善登记)';
        }else if (step == 2){
           this.title = '预购商品房预告登记(重新提交)';
        }else if (step == 51){  
            this.title = this.title +  "(资料上传)"                
        }else if (step == 52){  
            this.title = this.title +  "(审核提交)"                
        }
        
        this.$http({
          url: this.$http.adornUrl(`/bdc/bdcnoticeregist/item/list`),
              method: 'get',
              params: this.$http.adornParams()
          }).then(({data}) => {
            if (data && data.code === 0) {
                // this.dataForm.siteList = data.siteList
                this.dataForm.contractTypeList = data.contractTypeList
                this.dataForm.seRegionList = data.regionList
 
                this.dataForm.left1 = ''
                this.dataForm.left2 = ''
                this.dataForm.right1 = ''
                this.dataForm.right2 = ''

                this.$nextTick(() => {
                this.$refs['dataForm'].resetFields()
            
                  this.dataListLoading = true;
                  if (step == 0){
                    this.$http({
                      url: this.$http.adornUrl(`/bdc/bdccontract/info/${this.dataForm.seqno}`),
                      method: 'get',
                      params: this.$http.adornParams()
                    }).then(({data}) => {
                      if (data && data.code === 0) {


                        this.dataForm.seRegion = data.seRegion
                        this.selectChanged(data.seRegion)
                        this.dataForm.region = data.bdcContract.region
                        this.selectChanged2(data.bdcContract.region)

                        this.dataForm.contractno = data.bdcContract.contractno
                        this.dataForm.ctype = data.bdcContract.ctype

                        this.dataForm.realtyunitno = data.realtyunitno
                        this.dataForm.fwyt = data.fwyt

                        this.qlrList = data.qlrList
                        this.ywrList = data.ywrList

                        this.dataForm.orgid = data.dyqr

                      }
                      this.dataListLoading = false;
                    })
                  }
                  else{
                        this.$http({
                        url: this.$http.adornUrl(`/bdc/bdcnoticeregist/info/${this.seqno}`),
                        method: 'get',
                        params: this.$http.adornParams()
                      }).then(({data}) => {
                        if (data && data.code === 0) {
                          this.dataForm.orgid = data.dyqr

                          this.dataForm.seRegion = data.noticeRegister.seRegion
                

                          this.selectChanged(data.noticeRegister.seRegion)
                          this.dataForm.region = data.noticeRegister.region
                          this.selectChanged2(data.noticeRegister.region)

                          this.dataForm.contractno = data.htba.HTBAH
                          this.dataForm.ctype = data.htba.HTLX

                          this.dataForm.realtyunitno = data.realtyunitno
                          this.dataForm.fwyt = data.fwyt

                          this.qlrList = data.qlrList
                          this.ywrList = data.ywrList

                          this.dataForm.babsm = data.noticeRegister.babsm
                          if (this.step == 2){
                            this.dataForm.babsm = ''
                          }
                          this.dataForm.site = data.noticeRegister.siteno

                          this.dataForm.rightagentname = data.qlrdlr.MC
                          this.dataForm.rightagentphone = data.qlrdlr.LXDH
                          this.dataForm.rightagentidcard = data.qlrdlr.ZJHM
                          this.dataForm.left1 = data.qlrXwbl.SFYYZS
                          this.dataForm.left2 = data.qlrXwbl.SFGY
                          this.dataForm.right1 = data.ywrXwbl.SFYYZS
                          this.dataForm.right2 = data.ywrXwbl.SFGY
                          this.dataForm.site = data.noticeRegister.bld

                          this.dataForm.lzr = data.noticeRegister.lzr
                          this.dataForm.lzsj = data.noticeRegister.lzsj 
                          this.dataForm.fj = data.noticeRegister.fj

                          this.dataForm.state = data.noticeRegister.state

                          this.dataForm.isdzyxyw = data.noticeRegister.isdzyxyw

                          this.oImages = []

                          if (data.file01){
                            var self = this
                            data.file01.forEach(function(item){
                              self.fileList1.push({'name':item, 'url': self.seqno + '_01_' + item})
                            })
                            
                          }
                          if (data.file02){
                            var self = this
                            data.file02.forEach(function(item){
                              self.fileList2.push({'name':item, 'url': self.seqno + '_02_' + item})
                            })
        
                          }
                          if (data.file03){
                            var self = this
                            data.file03.forEach(function(item){
                              self.fileList3.push({'name':item, 'url': self.seqno + '_03_' + item})
                            })
                      
                          }
                          if (data.file04){
                            var self = this
                            data.file04.forEach(function(item){
                              self.fileList4.push({'name':item, 'url': self.seqno + '_04_' + item})
                            })
                            
                          }
                          if (data.file05){
                            var self = this
                            data.file05.forEach(function(item){
                              self.fileList5.push({'name':item, 'url': self.seqno + '_05_' + item})
                            })
                          }
                          if (data.file07){
                            var self = this
                            data.file07.forEach(function(item){
                              self.fileList7.push({'name':item, 'url': self.seqno + '_07_' + item})
                            })
          
                          }
                          if (data.file06){
                            var self = this
                            data.file06.forEach(function(item){
                              self.fileList6.push({'name':item, 'url': self.seqno + '_06_' + item})
                            })
                          }

                        }
                        this.initBabsm()
                        this.dataListLoading = false;
                      })
                  }
                  
                
              })

            }
        })


      },

      isInputDisabled(){
          return this.step == 11  || !this.isAuth('bdc:bdcnoticeregist:save') 
          || this.dataForm.state != '' && this.dataForm.state != '00' && this.dataForm.state != '11'
           && this.dataForm.state != '53'
      },


      isFileDisabled(){
          return !this.isFileEnabled()
      },

      isFileEnabled(){
          return this.isAuth('bdc:bdcnoticeregist:upload')  &&  (this.dataForm.state == '41'
           || this.dataForm.state == '54' || this.dataForm.state == '51')
      },

      isSumbitEnabled(){

          return (this.dataForm.state=='52' || this.dataForm.state=='41')   && this.isAuth('bdc:bdcnoticeregist:commit') 

      },

      selectChanged(value){
          console.log("selectChanged:" + value)
          this.dataForm.region = '';
          this.$http({
          url: this.$http.adornUrl(`/sys/bdcregion/listByLevle`),
              method: 'get',
              params: this.$http.adornParams({'upregion':value})
          }).then(({data}) => {
            if (data && data.code === 0) {
              this.dataForm.regionList = data.list
            }
        })
      },
            // 上传成功
      successHandle (response, file, callback, successCallback) {

        if (response && response.code === 0) {
            this.$message({
              message: '上传文件成功',
              type: 'success',
              duration: 1500
            });
            if (!this.seqno){
              this.seqno = response.seqno
            }
            if (successCallback){
              successCallback(file)
            }
        } else {
          this.$message.error(response.msg)
          if (callback){
              callback();
            }
        }
      },
      // 上传成功
      successHandle1 (response, file) {
        var self = this;
        this.successHandle(response, file, function(){
          self.$refs.upload1.clearFiles()
        }, function(file){
          file.url = self.seqno + '_01_' + file.name;
          console.log(file)
        })
        
      },
      successHandle2 (response, file) {
        var self = this;
        this.successHandle(response, file, function(){
            self.$refs.upload2.clearFiles()
        }, function(file){
          file.url = self.seqno + '_02_' + file.name;
          console.log(file)
        })
        
      },
      successHandle3 (response, file) {
        var self = this;
        this.successHandle(response, file, function(){
            self.$refs.upload3.clearFiles()
        }, function(file){
          file.url = self.seqno + '_03_' + file.name;
          console.log(file)
        })
        
      },
      successHandle4 (response, file) {
        var self = this;
        this.successHandle(response, file, function(){
          self.$refs.upload4.clearFiles()
        }, function(file){
          file.url = self.seqno + '_04_' + file.name;
          console.log(file)
        })
        
      },
      successHandle5 (response, file) {
        var self = this;
        this.successHandle(response, file, function(){
            self.$refs.upload5.clearFiles()
        }, function(file){
          file.url = self.seqno + '_05_' + file.name;
          console.log(file)
        })
        
      },
      successHandle6 (response, file) {
        var self = this;
        this.successHandle(response, file, function(){
            self.$refs.upload6.clearFiles()
        }, function(file){
          file.url = self.seqno + '_06_' + file.name;
          console.log(file)
        })
        
      },

      beforeUpload (file) {
        if (this.dataForm.isdzyxyw == 0){
          if (file.type !== 'image/jpg' && file.type !== 'image/jpeg') {
            this.$message.error('只支持jpg格式的图片！')
              this.check = false
            return false
          }
        }else{
          if (file.type !== 'application/pdf' && file.type !== 'application/PDF') {
            this.$message.error('请上传pdf文件')
              this.check = false
            return false
          }
        }
           this.check = true 
      },

      // 上传之前
      beforeUploadHandle (file) {
        
      },

      handleExceed(files, fileList) {
        this.$message.warning('只能上传一个文件');
      },
      beforeRemove(file, fileList) {
        if (this.check){
            return this.$confirm(`确定移除 ${ file.name }？`);
        }
      },

      removeFile(file, fileList, filecode, callback){
          this.$http({
          url: this.$http.adornUrl(`/bdc/bdcnoticeregist/remove`),
              method: 'post',
              data: this.$http.adornData({
                'seqno': this.seqno,
                'fileCode': filecode,
                'fileName': file.name
              })
          }).then(({data}) => {
            if (data && data.code === 0) {
               if (this.check){
               this.$message({
                  message: '删除成功',
                  type: 'success',
                  duration: 1500
                })
              }
               
            }else{
              this.$message.error(data.msg)
              if (callback){
                  callback();
               }
            }
        })
      },

      handlePreview(file){
          if (!file.url){
            return
          }
          console.log(file.url)
          var token = this.$cookie.get('token')
      　　var url = this.$http.adornUrl('/bdc/bdcnoticeregist/downFile/' + file.url + '?token=' + token)
          window.open(url)
      },

      handleRemove21(file, fileList) {
        var self = this;
        this.removeFile(file, fileList, '01', function(){
            self.fileList1 = fileList;
        });
      },

      handleRemove22(file, fileList) {
        var self = this;
        this.removeFile(file, fileList, '02', function(){
            self.fileList2 = fileList;
        });
      },    

      handleRemove23(file, fileList) {
        var self = this;
        this.removeFile(file, fileList, '03', function(){
            self.fileList3 = fileList;
        });
      },

      handleRemove24(file, fileList) {
        var self = this;
        this.removeFile(file, fileList, '04', function(){
            self.fileList4 = fileList;
        });
      },

      handleRemove25(file, fileList) {
        var self = this;
        this.removeFile(file, fileList, '05', function(){
            self.fileList5 = fileList;
        });
      },

      handleRemove26(file, fileList) {
        var self = this;
        this.removeFile(file, fileList, '06', function(){
            self.fileList6 = fileList;
        });
      },

      checkHandle(){
        this.$http({
            url: this.$http.adornUrl(`/bdc/bdcnoticeregist/check/${this.seqno}`),
            method: 'get',
            params: this.$http.adornParams()
          }).then(({data}) => {
            if (data && data.code === 0) {
              this.downloadFileClick()
            }else{
              this.$message.error(data.msg)
            }
          })
      },


      downloadFileClick() {
          var token = this.$cookie.get('token')
      　　var url = this.$http.adornUrl(`/bdc/bdcnoticeregist/downApply/${this.seqno}?token=` + token)
          window.location.href = url
      },

      doSubmit(){

        this.tip = "正在提交"
        this.submitLoading = true;
        this.$http({
              url: this.$http.adornUrl('/bdc/bdcnoticeregist/send'),
              method: 'post',
              data: this.$http.adornData({
                'seqno': this.seqno,
                'rejectreason': this.dataForm.rejectreason,
                'checkresult':this.dataForm.checkresult,
                'seRegion': this.dataForm.seRegion,
                'region': this.dataForm.region,
                   'yxbsms': this.oImages,
                'btype': this.btype
              })
            }).then(({data}) => {
              if (data && data.code === 0) {

                this.$message({
                  message: '提交成功',
                  type: 'success',
                  duration: 1500,
                  onClose: () => {

                      this.visible = false
                      this.$emit('refreshDataList')
                    
                  }
                })
              } else {
                this.$message.error(data.msg)
              }
              this.submitLoading = false;
            }) .catch(err => {
              this.submitLoading = false;
              console.error(err);
              this.$message.error('系统异常')              
            }); 

      },

      submit(){


            this.$refs['dataForm'].validate((valid) => {
            if (valid) {
              
                  if ('1' == this.dataForm.checkresult){
                      this.$confirm('此操作将提交给登记中心, 是否继续?', '提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning',
                        center: true
                      }).then(() => {
                        this.doSubmit()
                      }).catch(() => {
                        
                      });
                  }
                  else{
                    this.doSubmit()
                  }

            }
            else{
              this.$message.error("参数校验失败")
   
            }
          })

                
      },

      isInputDisabled(){
          return this.step == 11  || !this.isAuth('bdc:bdcmortgregist:save') 
          || this.dataForm.state != '' && this.dataForm.state != '00' && this.dataForm.state != '11'
           && this.dataForm.state != '53'
      },

      isFileDisabled(){
          return this.step == 11  || !this.isAuth('bdc:bdcmortgregist:upload') 
          || this.dataForm.state &&  this.dataForm.state != '41'
           && this.dataForm.state != '54' && this.dataForm.state != '51'
      },

      isSumbitEnabled(){

          return (this.dataForm.state=='52' || this.dataForm.state=='41') 
            && this.isAuth('bdc:bdcmortgregist:commit') 

      },

      uploadComplete(){
          var files = this.$refs.upload1.uploadFiles;
          if (files.length == 0){
            this.$message.error("请上传文件编码01")
            return;
          }

          if (this.$refs.upload2.uploadFiles.length == 0){
            this.$message.error("请上传文件编码02")
            return;
          }

          if (this.$refs.upload3.uploadFiles.length == 0){
            this.$message.error("请上传文件编码03")
            return;
          }

          if (this.$refs.upload4.uploadFiles.length == 0){
            this.$message.error("请上传文件编码04")
            return;
          }

        this.tip = "正在保存资料"
        this.submitLoading = true;
        this.$http({
              url: this.$http.adornUrl('/bdc/bdcnoticeregist/uploadComplete'),
              method: 'post',
              data: this.$http.adornData({
                'seqno': this.seqno,
                'btype': this.btype
              })
            }).then(({data}) => {
              if (data && data.code === 0) {

                this.$message({
                  message: '预告登记信息资料上传完成',
                  type: 'success',
                  duration: 1500,
                  onClose: () => {

                      this.visible = false
                      this.$emit('refreshDataList')
                    
                  }
                })
              } else {
                this.$message.error(data.msg)
              }
              this.submitLoading = false;
            }) .catch(err => {
              this.submitLoading = false;
              console.error(err);
              this.$message.error('系统异常')              
            }); 

      },

      saveComplete(){

          this.save(true);
              
      },

      commit(path){

        var djry = [];
        if (this.dataForm.rightagentname){
          djry.push({
                    'TYPE': '10',
                    'RYLX': '1',
                    'ZJLB': '1',
                    'MC': this.dataForm.rightagentname,
                    'ZJHM': this.dataForm.rightagentidcard,
                    'LXDH': this.dataForm.rightagentphone
                },
                // {
                //     'TYPE': '9',
                //     'RYLX': '1',
                //     'ZJLB': '1',
                //     'MC': this.dataForm.rightagentname,
                //     'ZJHM': this.dataForm.rightagentidcard,
                //     'LXDH': this.dataForm.rightagentphone
                // },
                {
                    'TYPE': '11',
                    'RYLX': '1',
                    'ZJLB': '1',
                    'MC': this.dataForm.rightagentname,
                    'ZJHM': this.dataForm.rightagentidcard,
                    'LXDH': this.dataForm.rightagentphone
                }
                );
        }

        this.$http({
              url: this.$http.adornUrl('/bdc/bdcnoticeregist/' + path),
              method: 'post',
              data: this.$http.adornData({
                'seqno': this.seqno,
                'bld': this.dataForm.site,
                'seRegion': this.dataForm.seRegion,
                'region': this.dataForm.region,
                'djryList':djry,
                'xwblList': [{
                  'TYPE': '01',
                  'SFYYZS': this.dataForm.left1,
                  'SFGY': this.dataForm.left2,
                  'SFZJYS': this.dataForm.left3,
                  'SFZJYZ': this.dataForm.left4,
                },
                {
                  'TYPE': '02',
                  'SFYYZS': this.dataForm.right1,
                  'SFGY': this.dataForm.right2,
                  'SFZJYS': this.dataForm.right3,
                  'SFZJYZ': this.dataForm.right4,
                }],
                'babsm': this.step == 0 ? '' : this.dataForm.babsm,
                'htbaseqno': this.dataForm.seqno,
                'lzr': this.dataForm.lzr,
                'lzsj': this.dataForm.lzsj,
                'fj': this.dataForm.fj,
                'isdzyxyw': this.dataForm.isdzyxyw
              })
            }).then(({data}) => {
              if (data && data.code === 0) {
                if (path == 'save'){
                  if (data.seqno){
                    this.seqno = data.seqno
                  }                 
                }
                
                this.$message({
                  message: path == 'save' ? '预告信息保存成功':'预告信息录入完成',
                  type: 'success',
                  duration: 1500,
                  onClose: () => {
                    if (path == 'saveComplete'){
                        this.visible = false
                        this.$emit('refreshDataList')
                    }
                    
                  }
                })
              } else {
                this.$message.error(data.msg)
              }
            })  
      },

      // 表单提交
      save (isSubmit) {

        if (isSubmit){

          if (this.dataForm.left1 == ''){
            this.$message.error("请选择权利人询问笔录是否为真实意思表示")
            return;
          }

          if (this.dataForm.left2 == ''){
            this.$message.error("请选择权利人询问笔录是否为共有房屋")
            return;
          }

          if (this.dataForm.right1 == ''){
            this.$message.error("请选择义务人询问笔录是否为真实意思表示")
            return;
          }

          if (this.dataForm.right2 == ''){
            this.$message.error("请选择义务人询问笔录是否为共有房屋")
            return;
          }

          this.$refs['dataForm'].validate((valid) => {
            if (valid) {

              var self = this
              this.checkDyqrPhone(function(){
                  self.commit('saveComplete');
              })
            }
            else{
              this.$message.error("参数校验失败")
            }
          })

        }else{
          this.commit('save');
        }

      }
    }
  }
</script>
<style>
.el-input.is-disabled .el-input__inner {
    background-color: #f5f7fa;
    border-color: #e4e7ed;
    color: #313b50;
    cursor: not-allowed;
}


.wba{
  color:red;
  font-size: 16px;
}
</style>